package game;

import java.awt.Graphics2D;
import java.awt.Point;

class Level_02 extends BaseLevel
{
	float timeAnimationEnemie = 0.1f;

	public Level_02()
	{
		super();
		this.sizeMap = new Point(1600, 1200);
		respawn  = new Respawn(new Point(925,725),10,3f);
		mapa = new Mapa_02(sizeMap);
		player.intMine=3;
		CapacitorManager.getInstance().maxEnimie = 10;
		CapacitorManager.getInstance().minEnimie = 5;
	}
    public void update()
    {
    	super.update(Mapa_02.getObstaculos());
    	mapa.Update();
    	
    	switch(Game.rand.nextInt(4))
    	{
		case 0:
			respawn.Update(new Inimigo_01(15,
					super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
					new Point(40,40),
					new Point(0,0), 
					new Point(40,40),
	    			new Point(3,1),
	    			timeAnimationEnemie,
	    			true,
	    			100,
	    			3.5f),
	    			player,
	    			Mapa_02.getObstaculos(),
	    			3);
			break;

		case 1:
			respawn.Update(new Inimigo_02(16,
					super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
					new Point(40,40),
					new Point(0,0), 
					new Point(40,40),
	    			new Point(4,1),
	    			timeAnimationEnemie,
	    			true,
	    			100,
	    			3.5f),
	    			player,
	    			Mapa_02.getObstaculos(),
	    			3);
			break;

		case 2:
			respawn.Update(new Inimigo_01(15,
					super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
					new Point(40,40),
					new Point(0,0), 
					new Point(40,40),
	    			new Point(3,1),
	    			timeAnimationEnemie,
	    			true,
	    			100,
	    			3.5f),
	    			player,
	    			Mapa_02.getObstaculos(),
	    			3);
	    	break;
	
		case 3:
			respawn.Update(new Inimigo_03(18,
					super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
					new Point(40,40),
					new Point(0,0), 
	    			new Point(40,40),
	    			new Point(3,1),
	    			timeAnimationEnemie,
	    			true,
	    			100,
	    			3.5f),
	    			player,
	    			Mapa_02.getObstaculos(),
	    			4);
	    	break;
    	}

		
		
    }

	public void draw(Graphics2D g2d)
    {
		g2d.drawString("LEVEL: " + 0, 10, 10);
		super.draw(g2d);
		mapa.draw(g2d);
		super.Draw2(g2d);
	}
}
